package com.wing.product.controller;


import com.wing.common.utils.JsonResult;
import com.wing.product.entity.request.ProductCreateRequest;
import com.wing.product.service.ProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 生产入库管理
 */
@Validated
@Api(value = "畅捷通-生产入库管理", tags = "#/chanjet/product")
@RestController("ProductController")
@RequestMapping("product/admin/product")
@RequiredArgsConstructor
public class ProductController {

    @Resource
    ProductService productService;

    /**
     * 产成品入库单创建
     */
    @ApiOperation(value = "产成品入库单创建", notes = "保存")
    @PostMapping("/syncInProductReceive")
    public JsonResult syncInProductReceive(@RequestBody  ProductCreateRequest productCreateRequest) {
        return JsonResult.success(productService.syncInProductReceive(productCreateRequest));
    }



}
